package com.foreverwin.mes.production.support;

/**
 * @author Ervin Chen
 * @date 2020/2/4 12:34
 */
public enum UnloadStrategyFactory {
    //上料模式1：库存编号
    MSR01(new InventoryIdUnloadStrategy()),
    //上料模式2：物料+库存批次+数量
    MSR02(new ItemBatchNumberQtyUnloadStrategy()),
    //上料模式3：物料+库存批次
    MSR03(new ItemBatchNumberUnloadStrategy());

    private UnloadStrategy unloadStrategy;
    UnloadStrategyFactory(UnloadStrategy unloadStrategy ){
        this.unloadStrategy = unloadStrategy;
    }

    public static UnloadStrategy getUnloadStrategy( String loadMode ){
        return valueOf(loadMode).unloadStrategy;
    }
}
